<template>
  <div class="app-container">
    <!-- 顶部按钮区域开始 -->
    <el-form :model="queryParams" ref="queryForm" inline label-width="58px">
      <el-form-item label="订单状态">
        <el-select v-model="queryParams.status" placeholder="请选择" @change="getList">
          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button @click="resetQuery" icon="el-icon-plus" size="mini" type="success">新增</el-button>
        <el-button @click="handleQuery" icon="el-icon-search" size="mini" type="primary">搜索</el-button>
        <el-button @click="resetQuery" icon="el-icon-refresh" size="mini">重置</el-button>
      </el-form-item>
    </el-form>

  </div>
</template>

<script>
import { sellerList } from '@/api/goodsAdmin'
export default {
  data() {
    return {
      options: [
        {
          value: 1,
          label: '待处理'
        }, {
          value: 2,
          label: '已发货'
        }, {
          value: 3,
          label: '已收货'
        }, {
          value: 4,
          label: '待付款'
        }, {
          value: 5,
          label: '已取消'
        }
      ], //订单状态
      // 总条数
      total: 0,
      // 查询参数
      queryParams: {
        status: null,
        pageNum: 1,
        pageSize: 10
      },
      tableList:[]
    }
  },
  created() {
    this.sellerList()
  },
  methods: {
    getList() {
      sellerList(this.queryParams).then(res => {
        console.log(res);
        return
        this.tableList = res.rows
      })

    },
    handleQuery() {

    },
    resetQuery() {
      this.queryParams = {
        status: null,
        pageNum: 1
      }
    }
  }
}
</script>